home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 117 / PC Guia 117.iso / Software / Utils / Software2 / Product11 / Setup.exe / MT-3.16-full-en_US / tools / sig-validate < prev    next >
Encoding:
Text File  |  2004-09-08  |  787 b   |  25 lines

  1. #!/usr/bin/perl -w
  2.  
  3. use lib 'lib';
  4.  
  5. use MT::App::Comments;
  6.  
  7. use MT;
  8.  
  9. $mt = new MT;
  10.  
  11. $ARGV[0] =~ s/^[(.*)]$/$1/;
  12. $ARGV[1] =~ s/^[(.*)]$/$1/;
  13.  
  14. my ($email, $name, $nick, $ts, $token) = split '::', $ARGV[0];
  15.  
  16. my $validation = MT::App::Comments::_validate_signature($mt, 
  17.                                                         $ARGV[1],
  18.                                                         email => $email,
  19.                                                         name => $name,
  20.                                                         nick => $nick,
  21.                                                         ts => $ts,
  22.                                                         token => $token);
  23. print "The signature with timestamp together are: ",
  24.     $validation ? "VALID" : "invalid", "\n";
  25.